<template>
  <div>
    <el-button
      type="primary"
      @mouseenter.native="showDiv"
      @mouseleave.native="hideDiv"
    >
      {{ isShow ? "鼠标离开隐藏" : "鼠标放上显示" }}
    </el-button>
    <div v-show="isShow" class="show"></div>
  </div>
</template>


<script>
export default {
  name: "Two",
  components: {},
  data() {
    return {
      isShow: false,
    };
  },
  methods: {
    showDiv() {
      this.isShow = true;
    },
    hideDiv() {
      this.isShow = false;
    },
  },
};
</script>


<style scoped>
.show {
  width: 200px;
  height: 200px;
  background-color: #e9aaaa;
}
</style>